3.17 \(\int (c e+d e x) (a+b \tanh ^{-1}(c+d x))^2 \, dx\)

Optimal. Leaf size=95 \[ \frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+a b e x+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d} \]

[Out]

a*b*e*x+b^2*e*(d*x+c)*arctanh(d*x+c)/d-1/2*e*(a+b*arctanh(d*x+c))^2/d+1/2*e*(d*x+c)^2*(a+b*arctanh(d*x+c))^2/d
+1/2*b^2*e*ln(1-(d*x+c)^2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6107, 12, 5916, 5980, 5910, 260, 5948} \[ \frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+a b e x+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]

[Out]

a*b*e*x + (b^2*e*(c + d*x)*ArcTanh[c + d*x])/d - (e*(a + b*ArcTanh[c + d*x])^2)/(2*d) + (e*(c + d*x)^2*(a + b*
ArcTanh[c + d*x])^2)/(2*d) + (b^2*e*Log[1 - (c + d*x)^2])/(2*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 5916

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcT
anh[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTanh[c*x])^(p - 1))/(1 -
 c^2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rule 5980

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2
/e, Int[(f*x)^(m - 2)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[(d*f^2)/e, Int[((f*x)^(m - 2)*(a + b*ArcTanh[c*x])
^p)/(d + e*x^2), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 6107

Int[((a_.) + ArcTanh[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[
Int[((f*x)/d)^m*(a + b*ArcTanh[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f,
 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int (c e+d e x) \left (a+b \tanh ^{-1}(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int e x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e \operatorname {Subst}\left (\int x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {(b e) \operatorname {Subst}\left (\int \frac {x^2 \left (a+b \tanh ^{-1}(x)\right )}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {(b e) \operatorname {Subst}\left (\int \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}-\frac {(b e) \operatorname {Subst}\left (\int \frac {a+b \tanh ^{-1}(x)}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {\left (b^2 e\right ) \operatorname {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {\left (b^2 e\right ) \operatorname {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 134, normalized size = 1.41 \[ e \left (\frac {a^2 (c+d x)^2}{2 d}+\frac {\left (a b+b^2\right ) \log (-c-d x+1)}{2 d}+\frac {\left (b^2-a b\right ) \log (c+d x+1)}{2 d}+\frac {a b (c+d x)}{d}+\frac {b (c+d x) \tanh ^{-1}(c+d x) (a (c+d x)+b)}{d}+\frac {\left (b^2 (c+d x)^2-b^2\right ) \tanh ^{-1}(c+d x)^2}{2 d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]

[Out]

e*((a*b*(c + d*x))/d + (a^2*(c + d*x)^2)/(2*d) + (b*(c + d*x)*(b + a*(c + d*x))*ArcTanh[c + d*x])/d + ((-b^2 +
 b^2*(c + d*x)^2)*ArcTanh[c + d*x]^2)/(2*d) + ((a*b + b^2)*Log[1 - c - d*x])/(2*d) + ((-(a*b) + b^2)*Log[1 + c
 + d*x])/(2*d))

________________________________________________________________________________________

fricas [B]  time = 0.47, size = 191, normalized size = 2.01 \[ \frac {4 \, a^{2} d^{2} e x^{2} + 8 \, {\left (a^{2} c + a b\right )} d e x + 4 \, {\left (a b c^{2} + b^{2} c - a b + b^{2}\right )} e \log \left (d x + c + 1\right ) - 4 \, {\left (a b c^{2} + b^{2} c - a b - b^{2}\right )} e \log \left (d x + c - 1\right ) + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (b^{2} c^{2} - b^{2}\right )} e\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2} + 4 \, {\left (a b d^{2} e x^{2} + {\left (2 \, a b c + b^{2}\right )} d e x\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="fricas")

[Out]

1/8*(4*a^2*d^2*e*x^2 + 8*(a^2*c + a*b)*d*e*x + 4*(a*b*c^2 + b^2*c - a*b + b^2)*e*log(d*x + c + 1) - 4*(a*b*c^2
 + b^2*c - a*b - b^2)*e*log(d*x + c - 1) + (b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (b^2*c^2 - b^2)*e)*log(-(d*x + c +
 1)/(d*x + c - 1))^2 + 4*(a*b*d^2*e*x^2 + (2*a*b*c + b^2)*d*e*x)*log(-(d*x + c + 1)/(d*x + c - 1)))/d

________________________________________________________________________________________

giac [B]  time = 0.35, size = 369, normalized size = 3.88 \[ \frac {{\left (\frac {{\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2}}{d x + c - 1} - \frac {2 \, {\left (d x + c + 1\right )}^{2} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{{\left (d x + c - 1\right )}^{2}} + \frac {4 \, {\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d x + c - 1} - 2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right ) + \frac {4 \, {\left (d x + c + 1\right )} a b e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {2 \, {\left (d x + c + 1\right )}^{2} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {4 \, {\left (d x + c + 1\right )} a^{2} e}{d x + c - 1} + \frac {4 \, {\left (d x + c + 1\right )} a b e}{d x + c - 1} - 4 \, a b e\right )} {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )}}{4 \, {\left (\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="giac")

[Out]

1/4*((d*x + c + 1)*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1))^2/(d*x + c - 1) - 2*(d*x + c + 1)^2*b^2*e*log(-(d*x
 + c + 1)/(d*x + c - 1) + 1)/(d*x + c - 1)^2 + 4*(d*x + c + 1)*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1) + 1)/(d*
x + c - 1) - 2*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1) + 1) + 4*(d*x + c + 1)*a*b*e*log(-(d*x + c + 1)/(d*x + c
 - 1))/(d*x + c - 1) + 2*(d*x + c + 1)^2*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1))/(d*x + c - 1)^2 - 2*(d*x + c
+ 1)*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1))/(d*x + c - 1) + 4*(d*x + c + 1)*a^2*e/(d*x + c - 1) + 4*(d*x + c
+ 1)*a*b*e/(d*x + c - 1) - 4*a*b*e)*((c + 1)*d - (c - 1)*d)/((d*x + c + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c
+ 1)*d^2/(d*x + c - 1) + d^2)

________________________________________________________________________________________

maple [B]  time = 0.06, size = 390, normalized size = 4.11 \[ \frac {d \,x^{2} a^{2} e}{2}+x \,a^{2} c e +\frac {a^{2} c^{2} e}{2 d}+\frac {d \arctanh \left (d x +c \right )^{2} x^{2} b^{2} e}{2}+\arctanh \left (d x +c \right )^{2} x \,b^{2} c e +\frac {\arctanh \left (d x +c \right )^{2} b^{2} c^{2} e}{2 d}+\arctanh \left (d x +c \right ) x \,b^{2} e +\frac {\arctanh \left (d x +c \right ) b^{2} c e}{d}+\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c -1\right )}{2 d}-\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c +1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c -1\right )^{2}}{8 d}-\frac {e \,b^{2} \ln \left (d x +c -1\right ) \ln \left (\frac {1}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {e \,b^{2} \ln \left (d x +c -1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c +1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c +1\right )^{2}}{8 d}-\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (d x +c +1\right )}{4 d}+\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+d \arctanh \left (d x +c \right ) x^{2} a b e +2 \arctanh \left (d x +c \right ) x a b c e +\frac {\arctanh \left (d x +c \right ) a b \,c^{2} e}{d}+a b e x +\frac {a b c e}{d}+\frac {e a b \ln \left (d x +c -1\right )}{2 d}-\frac {e a b \ln \left (d x +c +1\right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x)

[Out]

1/2*d*x^2*a^2*e+x*a^2*c*e+1/2/d*a^2*c^2*e+1/2*d*arctanh(d*x+c)^2*x^2*b^2*e+arctanh(d*x+c)^2*x*b^2*c*e+1/2/d*ar
ctanh(d*x+c)^2*b^2*c^2*e+arctanh(d*x+c)*x*b^2*e+1/d*arctanh(d*x+c)*b^2*c*e+1/2/d*e*b^2*arctanh(d*x+c)*ln(d*x+c
-1)-1/2/d*e*b^2*arctanh(d*x+c)*ln(d*x+c+1)+1/8/d*e*b^2*ln(d*x+c-1)^2-1/4/d*e*b^2*ln(d*x+c-1)*ln(1/2+1/2*d*x+1/
2*c)+1/2/d*e*b^2*ln(d*x+c-1)+1/2/d*e*b^2*ln(d*x+c+1)+1/8/d*e*b^2*ln(d*x+c+1)^2-1/4/d*e*b^2*ln(-1/2*d*x-1/2*c+1
/2)*ln(d*x+c+1)+1/4/d*e*b^2*ln(-1/2*d*x-1/2*c+1/2)*ln(1/2+1/2*d*x+1/2*c)+d*arctanh(d*x+c)*x^2*a*b*e+2*arctanh(
d*x+c)*x*a*b*c*e+1/d*arctanh(d*x+c)*a*b*c^2*e+a*b*e*x+1/d*a*b*c*e+1/2/d*e*a*b*ln(d*x+c-1)-1/2/d*e*a*b*ln(d*x+c
+1)

________________________________________________________________________________________

maxima [B]  time = 0.60, size = 316, normalized size = 3.33 \[ \frac {1}{2} \, a^{2} d e x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c e x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac {{\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (-d x - c + 1\right )^{2} + 4 \, {\left (b^{2} d e x + {\left (c e + e\right )} b^{2}\right )} \log \left (d x + c + 1\right ) - 2 \, {\left (2 \, b^{2} d e x + 2 \, {\left (c e - e\right )} b^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )\right )} \log \left (-d x - c + 1\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*a^2*d*e*x^2 + 1/2*(2*x^2*arctanh(d*x + c) + d*(2*x/d^2 - (c^2 + 2*c + 1)*log(d*x + c + 1)/d^3 + (c^2 - 2*c
 + 1)*log(d*x + c - 1)/d^3))*a*b*d*e + a^2*c*e*x + (2*(d*x + c)*arctanh(d*x + c) + log(-(d*x + c)^2 + 1))*a*b*
c*e/d + 1/8*((b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (c^2*e - e)*b^2)*log(d*x + c + 1)^2 + (b^2*d^2*e*x^2 + 2*b^2*c*d
*e*x + (c^2*e - e)*b^2)*log(-d*x - c + 1)^2 + 4*(b^2*d*e*x + (c*e + e)*b^2)*log(d*x + c + 1) - 2*(2*b^2*d*e*x
+ 2*(c*e - e)*b^2 + (b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (c^2*e - e)*b^2)*log(d*x + c + 1))*log(-d*x - c + 1))/d

________________________________________________________________________________________

mupad [B]  time = 1.56, size = 432, normalized size = 4.55 \[ x\,\left (a\,e\,\left (b+3\,a\,c\right )-2\,a^2\,c\,e\right )+{\ln \left (1-d\,x-c\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )-\ln \left (1-d\,x-c\right )\,\left (\ln \left (c+d\,x+1\right )\,\left (\frac {b^2\,c\,e\,x}{2}-\frac {\frac {b^2\,e}{2}-\frac {b^2\,c^2\,e}{2}}{2\,d}+\frac {b^2\,d\,e\,x^2}{4}\right )-\frac {x\,\left (4\,b^2\,d^2\,e\,\left (c-1\right )-4\,b^2\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )+8\,b^2\,c\,d^2\,e\right )}{16\,d^2}+\frac {x\,\left (8\,b\,d^2\,e\,\left (4\,a\,c-2\,a+b\,c\right )+4\,b\,d^2\,e\,\left (4\,a+b\right )\,\left (c+1\right )-4\,b\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )\,\left (4\,a+b\right )\right )}{16\,d^2}-\frac {b^2\,d\,e\,x^2}{8}+\frac {b\,d\,e\,x^2\,\left (4\,a+b\right )}{8}\right )+{\ln \left (c+d\,x+1\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )+\frac {\ln \left (c+d\,x+1\right )\,\left (e\,b^2\,c+e\,b^2+a\,e\,b\,c^2-a\,e\,b\right )}{2\,d}+\frac {\ln \left (c+d\,x-1\right )\,\left (-e\,b^2\,c+e\,b^2-a\,e\,b\,c^2+a\,e\,b\right )}{2\,d}+d\,\ln \left (c+d\,x+1\right )\,\left (\frac {x\,\left (e\,b^2+2\,a\,c\,e\,b\right )}{2\,d}+\frac {a\,b\,e\,x^2}{2}\right )+\frac {a^2\,d\,e\,x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*e + d*e*x)*(a + b*atanh(c + d*x))^2,x)

[Out]

x*(a*e*(b + 3*a*c) - 2*a^2*c*e) + log(1 - d*x - c)^2*((b^2*c*e*x)/4 - (b^2*e - b^2*c^2*e)/(8*d) + (b^2*d*e*x^2
)/8) - log(1 - d*x - c)*(log(c + d*x + 1)*((b^2*c*e*x)/2 - ((b^2*e)/2 - (b^2*c^2*e)/2)/(2*d) + (b^2*d*e*x^2)/4
) - (x*(4*b^2*d^2*e*(c - 1) - 4*b^2*d*e*(d*(c - 1) + d*(c + 1)) + 8*b^2*c*d^2*e))/(16*d^2) + (x*(8*b*d^2*e*(4*
a*c - 2*a + b*c) + 4*b*d^2*e*(4*a + b)*(c + 1) - 4*b*d*e*(d*(c - 1) + d*(c + 1))*(4*a + b)))/(16*d^2) - (b^2*d
*e*x^2)/8 + (b*d*e*x^2*(4*a + b))/8) + log(c + d*x + 1)^2*((b^2*c*e*x)/4 - (b^2*e - b^2*c^2*e)/(8*d) + (b^2*d*
e*x^2)/8) + (log(c + d*x + 1)*(b^2*e - a*b*e + b^2*c*e + a*b*c^2*e))/(2*d) + (log(c + d*x - 1)*(b^2*e + a*b*e
- b^2*c*e - a*b*c^2*e))/(2*d) + d*log(c + d*x + 1)*((x*(b^2*e + 2*a*b*c*e))/(2*d) + (a*b*e*x^2)/2) + (a^2*d*e*
x^2)/2

________________________________________________________________________________________

sympy [A]  time = 3.23, size = 238, normalized size = 2.51 \[ \begin {cases} a^{2} c e x + \frac {a^{2} d e x^{2}}{2} + \frac {a b c^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname {atanh}{\left (c + d x \right )} + a b d e x^{2} \operatorname {atanh}{\left (c + d x \right )} + a b e x - \frac {a b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} c^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname {atanh}^{2}{\left (c + d x \right )} + \frac {b^{2} c e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} d e x^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{2} + b^{2} e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b^{2} e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} - \frac {b^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atanh}{\relax (c )}\right )^{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)*(a+b*atanh(d*x+c))**2,x)

[Out]

Piecewise((a**2*c*e*x + a**2*d*e*x**2/2 + a*b*c**2*e*atanh(c + d*x)/d + 2*a*b*c*e*x*atanh(c + d*x) + a*b*d*e*x
**2*atanh(c + d*x) + a*b*e*x - a*b*e*atanh(c + d*x)/d + b**2*c**2*e*atanh(c + d*x)**2/(2*d) + b**2*c*e*x*atanh
(c + d*x)**2 + b**2*c*e*atanh(c + d*x)/d + b**2*d*e*x**2*atanh(c + d*x)**2/2 + b**2*e*x*atanh(c + d*x) + b**2*
e*log(c/d + x + 1/d)/d - b**2*e*atanh(c + d*x)**2/(2*d) - b**2*e*atanh(c + d*x)/d, Ne(d, 0)), (c*e*x*(a + b*at
anh(c))**2, True))

________________________________________________________________________________________